package com.oracle.service.impl;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.oracle.dao.StudentDao;
import com.oracle.model.Student;
import com.oracle.service.StudentService;
@Component("studentService")
@Scope(value="prototype")
public class StudentServiceImpl implements StudentService {
	private StudentDao dao;
	private StudentDao stuDao;
	public StudentDao getDao() {
		return dao;
	}
	@Autowired
	public void setDao(@Qualifier(value="studentDao")StudentDao dao) {
		this.dao = dao;
	}
	
	
	
	
	public StudentDao getStuDao() {
		return stuDao;
	}
	@Resource
	public void setStuDao(StudentDao stuDao) {
		this.stuDao = stuDao;
	}
	
	
	@Override
	public void addStudent(Student student) {
		this.dao.save(student);
		this.stuDao.save(student);
	}
	
}
